//
//  LZRestaurantAuthSuccessViewController.m
//  laziz_Merchant
//
//  Created by xbnzd on 17/3/8.
//  Copyright © 2017年 XBN. All rights reserved.
//

#import "LZRestaurantAuthSuccessViewController.h"
#import "UIView+Rotation.h"
#import "UIViewController+NavigationItemSetting.h"

@interface LZRestaurantAuthSuccessViewController ()
@property (weak, nonatomic) IBOutlet UILabel *labelTop;
@property (weak, nonatomic) IBOutlet UILabel *labelBottom;

@end

@implementation LZRestaurantAuthSuccessViewController

- (id)init
{
    self = [super init];
    if (self) {
        self.hidesBottomBarWhenPushed = YES;
    }
    
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self configureUI];
    
    [self configureNav];
}

#pragma mark -
#pragma mark UI NavBar
- (void)configureUI
{
    self.umLogPageViewName = @"商户认证成功";
    self.title = LZLocalizedString(@"res_auth_restaurant_authentication", nil);
    self.labelTop.text = LZLocalizedString(@"res_auth_upload_success_alert", nil);
    self.labelBottom.text = @"";
}

- (void)configureNav
{
    UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
    btn.frame = CGRectMake(0, 0, 60, 40);
    [btn addTarget:self action:@selector(navbarBackButtonClickAction) forControlEvents:UIControlEventTouchUpInside];
    UIImage *image_back = [UIImage imageNamed:@"lz_back_en"];
    [btn setImage:image_back forState:UIControlStateNormal];
    btn.imageEdgeInsets = UIEdgeInsetsMake(0, 0, 0, CGRectGetWidth(btn.frame)-image_back.size.width);
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 9.0) {
        [btn setLanguageRotaion];
    }
    [self navigationItemSetting:@[btn] type:NAVIGATIONITEMSETTING_LEFT];
 }

- (void)navbarBackButtonClickAction
{
    [self.navigationController popToRootViewControllerAnimated:YES];
}

@end
